package com.zhl.controller;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.zhl.service.EmployeeService;

@Controller
public class ZHLController {

	@Autowired
	EmployeeService employeeService;
	
	@RequestMapping("/a")
	public void index(HttpServletRequest request,HttpServletResponse response){
		
		System.out.println("嘿嘿嘿");
		
		String result = employeeService.doTest();
		response.setContentType("text/html;charset=UTF-8");
		response.setCharacterEncoding("UTF-8");
		try {
			response.getWriter().print(result);
		} catch (IOException e) {
			e.printStackTrace();
		}	
		return ;
	}
}
